<?php
/**
 * Created by PhpStorm.
 * User: venki
 * Date: 2023/11/18
 * Time: 12:05
 */

namespace app\Behaviors;

use yii\base\Behavior;

class CitiesBehavior extends Behavior
{
    public function events()
    {
        return [
            'cityRegistered' => 'handleCityRegistered',
        ];
    }

    public function handleCityRegistered($event)
    {
        // 处理userRegistered事件的逻辑
        $userId = $event->cityId;
        $data   = $event->data;
        echo 111111;die;
        // 其他逻辑
    }
}